package com.app.abby.perfectweather.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.app.abby.perfectweather.Constants;
import com.app.abby.perfectweather.R;

public class TextActivity extends AppCompatActivity {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_text);
        TextView tvContent = (TextView) findViewById(R.id.tv_content);
        String content = getIntent().getStringExtra(Constants.Text);
        tvContent.setText(content);
        TextView tvTitle = (TextView) findViewById(R.id.tv_title);
        String title = getIntent().getStringExtra(Constants.TITLE);
        tvTitle.setText(title);
        ImageView ivBack = (ImageView) findViewById(R.id.iv_back);
        ivBack.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
    }
}
